package cn.hh.system.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import cn.hh.basic.domain.BaseDomain;
import cn.hh.org.domain.Department;
import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * 实体类：
 */
public class Menu extends BaseDomain {
        private String name;
        private String component;
        private String url;
        private String icon;
        private Integer index;
        private Long parentId;
        private Menu parent;

        private String intro;
        private Boolean state;

        // 用于封装当前部门的子部门
        // 部门树最后一级没有数据就不显示
        @JsonInclude(JsonInclude.Include.NON_EMPTY)
        private List<Menu> children = new ArrayList<>();

        public Menu getParent() {
            return parent;
        }

        public void setParent(Menu parent) {
            this.parent = parent;
        }

        public List<Menu> getChildren() {
            return children;
        }

        public void setChildren(List<Menu> children) {
            this.children = children;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getComponent() {
            return component;
        }

        public void setComponent(String component) {
            this.component = component;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getIcon() {
            return icon;
        }

        public void setIcon(String icon) {
            this.icon = icon;
        }

        public Integer getIndex() {
            return index;
        }

        public void setIndex(Integer index) {
            this.index = index;
        }

        public Long getParentId() {
            return parentId;
        }

        public void setParentId(Long parentId) {
            this.parentId = parentId;
        }

        public String getIntro() {
            return intro;
        }

        public void setIntro(String intro) {
            this.intro = intro;
        }

        public Boolean getState() {
            return state;
        }

        public void setState(Boolean state) {
            this.state = state;
        }

        @Override
        public String toString() {
            return "Menu{" +
                    ", name=" + name +
                    ", component=" + component +
                    ", url=" + url +
                    ", icon=" + icon +
                    ", index=" + index +
                    ", parentId=" + parentId +
                    ", intro=" + intro +
                    ", state=" + state +
                    "}";
        }
    }
